package sc.common.test.hopper.model;

import java.util.concurrent.atomic.AtomicInteger;

import sc.common.test.hopper.enums.Verb;

public class MyMessage {
	
	private MyMessage(){}
	
	static AtomicInteger ID_COUNTER = new AtomicInteger();
	
	public static MyMessage new4send(){
		MyMessage message = new MyMessage();
		message.setId(ID_COUNTER.incrementAndGet());
		return message;
	}
	
	public static MyMessage new4receive(){
		return new MyMessage();
	}
	
	int id;
	Verb verb;
	String sessionId;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public Verb getVerb() {
		return verb;
	}

	public void setVerb(Verb verb) {
		this.verb = verb;
	}

	public String getSessionId() {
		return sessionId;
	}

	public void setSessionId(String sessionId) {
		this.sessionId = sessionId;
	}

	@Override
	public String toString() {
		return "MyMessage [id=" + id + ", verb=" + verb + ", sessionId="
				+ sessionId + "]";
	}

}
